package tech.xs.auth.api;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import tech.xs.auth.api.domain.bo.path.EditAuthPathPermissionBo;
import tech.xs.common.framework.domain.model.ApiResult;

@FeignClient(name = "${framework.service.auth.name}", contextId = "AuthPathPermissionApi")
public interface AuthPathPermissionApi {

    @GetMapping("/path/permission/isUsedPermissionCode")
    ApiResult<Boolean> isUsedPermissionCode(@RequestParam String permissionCode);

    @PostMapping("/update/byPermissionCode")
    ApiResult updateByPermissionCode(@RequestBody EditAuthPathPermissionBo bo);

}
